package main

import (
	"encoding/json"
	"fmt"
	"net/http"
	"webserver/engine"
)

func InitHandleFunc(ctx *engine.Context) {
	ctx.Writer.WriteHeader(http.StatusOK)
	ctx.Writer.Write([]byte("ok"))
}

func main() {
	server := engine.New()
	server.Route(http.MethodGet, "/login", InitHandleFunc)
	fmt.Println(json.Marshal(server))
	for {
		server.Run(":10800")
	}
}
